-- GENERATED SPELL FOR [Fenros] --


function spell0_507(pUnit, Event) --@Flame Spike,n/a--
pUnit:FullCastSpellOnTarget(6725,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_507', 12000, 1)
end

function spell1_507(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_507', 0, 1)
end

function spell2_507(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(865,pUnit)
pUnit:RegisterEvent('Sorts_507', 8000, 1)
end

function Sorts_507(pUnit, Event)
local choix_sorts_507 = math.random(0, 2)
if choix_sorts_507 == 0 then
pUnit:RegisterEvent('spell0_507', 1, 1)
end
if choix_sorts_507 == 1 then
pUnit:RegisterEvent('spell1_507', 1, 1)
end
if choix_sorts_507 == 2 then
pUnit:RegisterEvent('spell2_507', 1, 1)
end
end

function mob507_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_507', math.random(1500, 3000), 1)
end

function mob507_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob507_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob507_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(507, 1, 'mob507_Action')
RegisterUnitEvent(507, 2, 'mob507_Leave')
RegisterUnitEvent(507, 3, 'mob507_Kill')
RegisterUnitEvent(507, 4, 'mob507_Die')
